package com.cci.kangdao.dao;

import com.cci.kangdao.dao.model.SMNT;
import com.cci.kangdao.dao.model.SSHasSMN;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@MapperScan
public interface SSHasSMNDao {
    int deleteByPrimaryKey(Long id);

    int insert(SSHasSMN record);

    int insertSelective(SSHasSMN record);

    SSHasSMN selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SSHasSMN record);

    int updateByPrimaryKey(SSHasSMN record);

    @Update("update SSHasSMN_T set Flag = -1 where ServiceStationId = #{serviceStationId}")
    int deleteSSHasSMNByServiceStationId(Long serviceStationId);

    /**
     * 根据smn查询服务站id
     *
     * @param smn
     * @return
     */
    List<Long> getServiceStationListBySMN(@Param("smn") String smn);

    /**
     * 根据stationId查询smn
     *
     * @param stationId
     * @return
     */
    List<SSHasSMN> getSMNListByStationId(@Param("stationId") Long stationId);
}